
import java.util.Timer;
import java.util.TimerTask;


public class BusSim{
	
	
	
	public static void main(String[] args){
				
		if (args.length < 1){
			System.out.println("err: no routefile given");
			System.exit(1);
		}
		
		final Bus b1 = new Bus( "b1" , args[0] , "116" );
		final Bus b2 = new Bus( "b2" , args[1] , "117" );
			
		
		Timer timer = new Timer(); 
		timer.scheduleAtFixedRate ( new TimerTask() { 
			public void run() { 
				b1.step();
				b2.step();
			}
		}, 0, 1000); 
		
	}//main
	
	
}//class
